package edu.hunau.cxb19.oop.class16;

import org.junit.Test;

import edu.hunau.cxb19.oop.class16.enums.Season;

/**
 *
 *@author hb
 *
 * 2020-03-17 16:04:53
 */
public class SeasonTest {

	@Test
	public void test() {
		SeasonClass spring = SeasonClass.SPRING;
		System.out.println(spring);
	}
	
	@Test
	public void enumTest() {
		Season spring = Season.SPRING;
		Season winter = Season.WINTER;
		System.out.println(spring);
		System.out.println(winter);
		System.out.println(winter.getDesc());
		
		Season spring1 = Enum.valueOf(Season.class, "SPRING");
		System.out.println(spring1.getDesc());
		
		Season[] objs = Season.values();//获得当前枚举中的所有的实例对象
		
	}
}
